<?php
namespace app\not_start\controller;
use think\Controller;

class Index extends Controller
{
    public function index()
    {
        $config_time = $this->get_config_value('5','report_start');
        $this->assign([
            'error_code' => '500',
            'error_title'=> '未到时',
            'error_msg'  => '抱歉，还未到达报名时间！',
            'start_time' => date('Y-m-d',$config_time),
        ]);
        return $this->fetch();
    }

    public function get_config_value($_type, $_name)
    {
        $res = Model('Config')->get_this_config_value($_type, $_name);
        return $res['value'];
    }

    public function about()
    {
        $_about = Model('About')->get(['id' => '1']);
        $this->assign('about', $_about);
        return $this->fetch();
    }
}